'use client'
import React from 'react'
import { useParams } from 'next/navigation'
const JsonLd = () => {
  const params = useParams()
  const lang = params.lang as string
  return (
    <script
      type="application/ld+json"
      dangerouslySetInnerHTML={{ __html: JSON.stringify({
        '@context': 'https://schema.org',
        '@type': 'Product',
        name: lang === 'zh' ? '产品名称' : 'Product Name',
        image: 'https://example.com/product.jpg',
        description: lang === 'zh' ? '产品描述' : 'Product Description',
      })}}
    />
  )
}

export default JsonLd